package com.study.tiger.demo1;

import java.util.List;

/**
 * 套餐
 */
public class MealBuilder {

    public Meal prepareVegMeal (){
        Meal meal = new Meal();
        meal.addItem(new VegBurger());
        meal.addItem(new Coke());
        return meal;
    }

    public Meal prepareNonVegMeal (){
        Meal meal = new Meal();
        meal.addItem(new ChickenBurger());
        meal.addItem(new Pepsi());
        return meal;
    }

    public Meal customMeal(List<Item> itemList){
        Meal meal = new Meal();
        for (int i = 0; i < itemList.size(); i++) {
            meal.addItem(itemList.get(i));
        }
        return meal;
    }
}
